package com.example.demo.service;

import com.example.demo.mapper.UserMapper;
import com.example.demo.model.Userinfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * user:likai
 * Date:2023-02-14
 * Time:10:56
 */
@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;
    public int add(String username,String password){
        return userMapper.add(username,password);
    }
    public Userinfo login(String username,String password){
        return userMapper.login(username,password);
    }
    public Userinfo selectById(Integer uid){
        return userMapper.selectById(uid);
    }
    public Userinfo getUserByName(String username){
        return userMapper.getUserByName(username);
    }

}
